-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollout improved example converter #1064
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. Maintainer note: consult the runbook for dealing with any breaking changes. |
Is README.md missing any configuration options?
Please add a description for each of these options to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question around whether we expect to lose some examples but otherwise LGTM
@@ -3629,7 +3629,7 @@ | |||
} | |||
}, | |||
"docker:index/registryImage:RegistryImage": { | |||
"description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again\n\n## Example Usage\n\nBuild an image with the `docker.RemoteImage` resource and then push it to a registry:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst helloworld = new docker.RegistryImage(\"helloworld\", {keepRemotely: true});\nconst image = new docker.RemoteImage(\"image\", {\n name: \"registry.com/somename:1.0\",\n build: {\n context: `${path.cwd}/absolutePathToContextFolder`,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nhelloworld = docker.RegistryImage(\"helloworld\", keep_remotely=True)\nimage = docker.RemoteImage(\"image\",\n name=\"registry.com/somename:1.0\",\n build=docker.RemoteImageBuildArgs(\n context=f\"{path['cwd']}/absolutePathToContextFolder\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var helloworld = new Docker.RegistryImage(\"helloworld\", new()\n {\n KeepRemotely = true,\n });\n\n var image = new Docker.RemoteImage(\"image\", new()\n {\n Name = \"registry.com/somename:1.0\",\n Build = new Docker.Inputs.RemoteImageBuildArgs\n {\n Context = $\"{path.Cwd}/absolutePathToContextFolder\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := docker.NewRegistryImage(ctx, \"helloworld\", \u0026docker.RegistryImageArgs{\n\t\t\tKeepRemotely: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"image\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"registry.com/somename:1.0\"),\n\t\t\tBuild: \u0026docker.RemoteImageBuildArgs{\n\t\t\t\tContext: pulumi.String(fmt.Sprintf(\"%v/absolutePathToContextFolder\", path.Cwd)),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RegistryImage;\nimport com.pulumi.docker.RegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.inputs.RemoteImageBuildArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var helloworld = new RegistryImage(\"helloworld\", RegistryImageArgs.builder() \n .keepRemotely(true)\n .build());\n\n var image = new RemoteImage(\"image\", RemoteImageArgs.builder() \n .name(\"registry.com/somename:1.0\")\n .build(RemoteImageBuildArgs.builder()\n .context(String.format(\"%s/absolutePathToContextFolder\", path.cwd()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n helloworld:\n type: docker:RegistryImage\n properties:\n keepRemotely: true\n image:\n type: docker:RemoteImage\n properties:\n name: registry.com/somename:1.0\n build:\n context: ${path.cwd}/absolutePathToContextFolder\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", | |||
"description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again\n\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t0yv0 is it expected for some of these examples to be dropped? This seems like a step backward, but maybe they were just malformed or didn't convert cleanly?
@@ -34,3 +38,4 @@ actions: | |||
uses: webfactory/[email protected] | |||
with: | |||
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} | |||
pulumiConvert: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this file even exists -- I'm assuming it takes precedence over https://github.com/pulumi/ci-mgmt/blob/master/provider-ci/providers/docker/config.yaml? Ugh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this file here is the source of truth, and if you run make ci-mgmt
it resyncs derivative files to it.
|
Regarding the one example it appears to be another instance of pulumi/pulumi-converter-terraform#141 |
Rolls out improved TF example converter.